import { fetchData,postData,delData } from '../../api/index';

export default function(){
    let service_url = "/api/service";
    let getService = async () => {
        try {
            const res = await fetchData(service_url);
            return res
        } catch (error) {
        }
    }
    let postService = async <T>(data:T) => {
        try{
            const res = await postData(service_url + "/receipt",data=data);
            return res
        } catch (error) {

        }
    }
    return { getService,postService }
}